From: Jan Beulich Date: Thu, 29 Jan 2015 13:42:20 +0000 (+0000) Subject: x86/shadow: adjust mask shadow_audit_tables() passes to hash_foreach() X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~3815 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=88d07de868419224898508852e0c2553aa8d2e40;p=xen.git x86/shadow: adjust mask shadow_audit_tables() passes to hash_foreach() It so far having been ~1 made most of the code preceding the call pointless, but I assume this wasn't meant to be that way. Also replace the remaining hard coded ~1 with an expression documenting the intention a little better. Signed-off-by: Jan Beulich Adjust again to use SHF_page_type_mask, at Jan's suggestion. Signed-off-by: Tim Deegan --- diff --git a/xen/arch/x86/mm/shadow/common.c b/xen/arch/x86/mm/shadow/common.c index 7e6aeeb2c3..64c5a28394 100644 --- a/xen/arch/x86/mm/shadow/common.c +++ b/xen/arch/x86/mm/shadow/common.c @@ -3761,7 +3761,7 @@ void shadow_audit_tables(struct vcpu *v) #endif if ( SHADOW_AUDIT & SHADOW_AUDIT_ENTRIES_FULL ) - mask = ~1; /* Audit every table in the system */ + mask = SHF_page_type_mask; /* Audit every table in the system */ else { /* Audit only the current mode's tables */ @@ -3776,7 +3776,7 @@ void shadow_audit_tables(struct vcpu *v) } } - hash_foreach(v, ~1, callbacks, _mfn(INVALID_MFN)); + hash_foreach(v, mask, callbacks, _mfn(INVALID_MFN)); } #endif /* Shadow audit */